UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eI+lRHrX9XD8SrvkMiVLNIOt1UlXlcKVRIBcF2tbC/o='
WHERE
key_id = '431539753bc2f59effd9e047b8f1e10adb50592576649f00f45355cf6db1276c'
AND (
token = 'eI+lRHrX9XD8SrvkMiVLNIOt1UlXlcKVRIBcF2tbC/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)