UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lrBVsLtGc8uBz86H9q+DXIQKdlblW1H2dRYbtKec6UA=' 
WHERE 
  key_id = '3436feb86d83d86afe30ecc5c4c0a007be629eacae369bb925bfd39b0970e7b7' 
  AND (
    token = 'lrBVsLtGc8uBz86H9q+DXIQKdlblW1H2dRYbtKec6UA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.07694