UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WNCR94OgBW0Fv57I+1zsK8h4HxHQosv+ijeegKr4ueE=' 
WHERE 
  key_id = 'e6286031f764abfddf88a7693ea9aa592bd63e01e2faa9fdbeebf76b4fd4a092' 
  AND (
    token = 'WNCR94OgBW0Fv57I+1zsK8h4HxHQosv+ijeegKr4ueE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043