UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Vw2NAkVfKHZQttZ7ftzq1HOVOg0oSavLCyWF/rPqOlM=' 
WHERE 
  key_id = '9fa841e6154945f1549913e109803b60280d0c9eddcbfcc67827c1d1f2ddeed5' 
  AND (
    token = 'Vw2NAkVfKHZQttZ7ftzq1HOVOg0oSavLCyWF/rPqOlM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022