UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FpbDaCbwPnqKxSONhb5GbKA4mwF1fJ5gNd2tC/Ih9n4=' 
WHERE 
  key_id = '8e7659cbca029a0d1eed0979b7b9e8b419e9091f90e66c3e5969e7655ca6c609' 
  AND (
    token = 'FpbDaCbwPnqKxSONhb5GbKA4mwF1fJ5gNd2tC/Ih9n4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034