UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RslqkZZA3JJJl2xV2MkxDbe2knawZ5JqIL2zTsXB9Yo=' 
WHERE 
  key_id = 'd6e755ff0e7fa17ba8204dd5ebdbe1e2d3553eae1edc39f3a56f846d418752d3' 
  AND (
    token = 'RslqkZZA3JJJl2xV2MkxDbe2knawZ5JqIL2zTsXB9Yo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021