UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EVSTcicNdtsLeP9SQRPvYxbP62Tcyuh1ksG6NXFagJw='
WHERE
key_id = '2ea5ab73823a3652dabddbc1db1d7d10a593f26cc5edd50c2905f1e59105b34f'
AND (
token = 'EVSTcicNdtsLeP9SQRPvYxbP62Tcyuh1ksG6NXFagJw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)