UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'o/7YMjrZNl+hATJUkicDvUfhHkfr5x3kgDZrlISZAWI=' 
WHERE 
  key_id = '2553fca32aef20c70517f4ce9c6011de47664db8aa643094a0aa5a938e7ef3b6' 
  AND (
    token = 'o/7YMjrZNl+hATJUkicDvUfhHkfr5x3kgDZrlISZAWI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021