UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/LwJ7/0wJ5qef9VD4YtRh5WhCtxsP0qieyZL9mCrSls=' 
WHERE 
  key_id = '019c4845b45b6b3205f4f1418cd6b94003240b052d9e0f824d084dfc2fa0e4bc' 
  AND (
    token = '/LwJ7/0wJ5qef9VD4YtRh5WhCtxsP0qieyZL9mCrSls=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022