UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uFcZS2Gfuwj7RVQWcD3k2yYUBTuc5R3c/WRLzPPxpm0='
WHERE
key_id = '1b34c7a39a95cbb9ef4ee351d9c87911fe298fec03076d16595d644ff3412f81'
AND (
token = 'uFcZS2Gfuwj7RVQWcD3k2yYUBTuc5R3c/WRLzPPxpm0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)