UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GIASuMqBplKUjuffqQCCRKpGMHebDll4UGG5Jzayjtc='
WHERE
key_id = '88740664c54f98f119312b6fe887529129b349681dce8a7b56d9236b9ef111df'
AND (
token = 'GIASuMqBplKUjuffqQCCRKpGMHebDll4UGG5Jzayjtc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)