UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kwW+2+m8x+9vLkW93lG8AVyKKb1yey1l2Qr5GMXoE/w=' 
WHERE 
  key_id = 'a4c106fc81ad868a1f5f438b8815a4cf2ba5c3df4526ce4b1ff4d9c199508cbb' 
  AND (
    token = 'kwW+2+m8x+9vLkW93lG8AVyKKb1yey1l2Qr5GMXoE/w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026