UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'akrmjcJ2BVXE+CMJNgCnwk5pSDO+X11iCcpy3GaTvu8=' 
WHERE 
  key_id = '44ad569d1c0a27732fd1e04ccb6cdfea119f6d075a1cdd9e94cc8527531f5d10' 
  AND (
    token = 'akrmjcJ2BVXE+CMJNgCnwk5pSDO+X11iCcpy3GaTvu8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050