UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3zhiaQxKPZCbu/zOhrEyiCSCxhtFBpD3y37P3d1Fb+Y=' 
WHERE 
  key_id = '8322b96e966c59ae5cd86f61ea59cf222d98122ec676e128e53c166e771d0975' 
  AND (
    token = '3zhiaQxKPZCbu/zOhrEyiCSCxhtFBpD3y37P3d1Fb+Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049