UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2ZzTa/CKUO8kQvezZI+FPUD5uAi+/Oj3m0QO+NF3P4s='
WHERE
key_id = '4aef9af74fa3e9b936d384fdcd9c34d88ad13084599a4de71e20a4243d651ae3'
AND (
token = '2ZzTa/CKUO8kQvezZI+FPUD5uAi+/Oj3m0QO+NF3P4s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)