UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JkYrv60WCLRsfdmDTSmzQHIpb+yzeHfSPg1EZ0dVqng=' 
WHERE 
  key_id = 'd1dca79d7e6ca5a6472aafd044b2c4c0eeae66d412e30ad7d2eca228eeb2ba83' 
  AND (
    token = 'JkYrv60WCLRsfdmDTSmzQHIpb+yzeHfSPg1EZ0dVqng=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042