UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3GgaDczk9UDCoS32/mSpwMe3scKiMnIo8nW/9FaGzZo='
WHERE
key_id = '5dd43fb7d534d92f9ea4477e39836c8b794a681bc609a2cbe4ed8f034e56d577'
AND (
token = '3GgaDczk9UDCoS32/mSpwMe3scKiMnIo8nW/9FaGzZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)