UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'goqKnyOwqlnejSz0CwIvsTiT2TcTkSFqtzTKY7R1hAw=' 
WHERE 
  key_id = '48b15cf0800a3cb3d85f2dd3bcf6cd54cf6c9e4e88f8d758eabe24f935342cf8' 
  AND (
    token = 'goqKnyOwqlnejSz0CwIvsTiT2TcTkSFqtzTKY7R1hAw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030