UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'dcHvJOiPto8iIuGoN5lu8O6B8AmlElNTvXMosHbkH6o=' 
WHERE 
  key_id = '1dc0e608857ace9177b5ee8ad49897fd2eccada052c8a2e315cc0bfdca793fe2' 
  AND (
    token = 'dcHvJOiPto8iIuGoN5lu8O6B8AmlElNTvXMosHbkH6o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027