UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WGUjsYpbrYyFGNYUz61nTvTD3Wu/mgP1tBVSE8XiT4o='
WHERE
key_id = '1cfa6a9e5ec28fe636395cadf420a76ab82322d29fa22a3bb964ab7209ff3433'
AND (
token = 'WGUjsYpbrYyFGNYUz61nTvTD3Wu/mgP1tBVSE8XiT4o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)