UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GUMp5UHgaQ/L5dJCenrlaounEKtt8TrN38eLjFa9qhc='
WHERE
key_id = '00320194c2ee088f3482e0b37e2b3f75f16ceddc00911f68b4f0a77629cf7acd'
AND (
token = 'GUMp5UHgaQ/L5dJCenrlaounEKtt8TrN38eLjFa9qhc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)