UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jUXoQUHiG/s/g1EUi4nV5WGZI44bUhn/iNlvDqtknTQ='
WHERE
key_id = '86130f3a53b93aa6072df74e315e59df9f86a771b01aa3cdf453209ac06251d8'
AND (
token = 'jUXoQUHiG/s/g1EUi4nV5WGZI44bUhn/iNlvDqtknTQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)