UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ljCnVXhFzQ6kFe/AGob0Gc12GC3K6JoLHgVnZSWFAK8='
WHERE
key_id = 'cae4b4a678ecf76a05ab7c6047071eadf50e9681ca1eed053e5611a7dfb48178'
AND (
token = 'ljCnVXhFzQ6kFe/AGob0Gc12GC3K6JoLHgVnZSWFAK8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)