UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E/ECUVcoJx/KZjoOQW/RMC+kYAtNRSg3DAYP4XP7CZM='
WHERE
key_id = '45c0873fc060f33ea80b42482cab09acb9426afa6dc1f2d973e80aae58f3456c'
AND (
token = 'E/ECUVcoJx/KZjoOQW/RMC+kYAtNRSg3DAYP4XP7CZM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)