UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L/6O/2wll3xE3RNxQ9GGAVdplgWpdo5N2rGXXT/rDZ4='
WHERE
key_id = '2d2a3feae85ebe492e47c4d0b45d12ae9207c9bcd6c0cb7c631545c483026071'
AND (
token = 'L/6O/2wll3xE3RNxQ9GGAVdplgWpdo5N2rGXXT/rDZ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)