UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'y0ktFd+M+JBy9pb0RdYpWWjmq2if4F9femNVYPgvyR0=' 
WHERE 
  key_id = '143ff92ca93746117d779fde283fd451a9c872135624abf36f46f49b08cd1660' 
  AND (
    token = 'y0ktFd+M+JBy9pb0RdYpWWjmq2if4F9femNVYPgvyR0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030