UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5emUQ++J0KoKoPBYky82B33MPHQsz/hfvJu1vaBiq/s='
WHERE
key_id = 'ee72cb5f95a71289ed4abedc33089fa8dea8222de052d29cbbe20b0f5ead7b03'
AND (
token = '5emUQ++J0KoKoPBYky82B33MPHQsz/hfvJu1vaBiq/s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)