UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OQXln64vlXInnQYVSR7GSXqueWE3nae44ZLH3Zddh98='
WHERE
key_id = '364755a6bf1c35e6a079ca6861366e492d7c1907d073c3d5391641836ea86840'
AND (
token = 'OQXln64vlXInnQYVSR7GSXqueWE3nae44ZLH3Zddh98='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)