UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'dscWRubdDhHXgNkpR/NSPXvHyikwq4mFK1dirJX7t0U=' 
WHERE 
  key_id = '0ea609370e968e0a1550b6099979d998682b6c5b4add42254f07cfb301f768a8' 
  AND (
    token = 'dscWRubdDhHXgNkpR/NSPXvHyikwq4mFK1dirJX7t0U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024