UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oje2cXby2utaR/FIzif4YzVrgCYLS7JbRHLbvgpIRtg=' 
WHERE 
  key_id = '23040385c00fdf01540b954c732171a66f708e9635e63b6aa54d64d32e0c032c' 
  AND (
    token = 'oje2cXby2utaR/FIzif4YzVrgCYLS7JbRHLbvgpIRtg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026