UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Wz5DVpfMfy+PfvuwgH8KCSom4ZcYHctZUs4dDTov6r0=' 
WHERE 
  key_id = '62308e3c1e723c04c0c172f43dafb9797085db79c446f2f4b98fcb1cf17bcd57' 
  AND (
    token = 'Wz5DVpfMfy+PfvuwgH8KCSom4ZcYHctZUs4dDTov6r0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047