UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ua96EiGpi/8nAa2wQ4Ms+ZZoFpnBJR9mv/CdWu1OSfc='
WHERE
key_id = 'ae79dec269cdf10acec93c77edb9356fc65be1eacbbaa828301dbbff7b980d5e'
AND (
token = 'Ua96EiGpi/8nAa2wQ4Ms+ZZoFpnBJR9mv/CdWu1OSfc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)