UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LvGLQhzAHDtPArp/3cVkrObD/qh1jLc+7iy9kLCDWn0=' 
WHERE 
  key_id = '62568001fc21776a4d33867b702651ab91e61d823ee99904bf00a0e5c587edcb' 
  AND (
    token = 'LvGLQhzAHDtPArp/3cVkrObD/qh1jLc+7iy9kLCDWn0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048