UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'P/QBp6GZqypMKnoBNxta6eM0hVhaB2k/1b71iL3NEec='
WHERE
key_id = 'ac550a282be5067b56d902e68de7cf4e664179d7b08bf9fc654f89cb7d4748ee'
AND (
token = 'P/QBp6GZqypMKnoBNxta6eM0hVhaB2k/1b71iL3NEec='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)