UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '30tHAj7WFwuDKhpModtF4vyQRAJdk1pmJrUU7XQjmSg='
WHERE
key_id = '911847385cb254d93cd48939bcf50f8feecae01d1bd5bba6691d79b7d528d7fe'
AND (
token = '30tHAj7WFwuDKhpModtF4vyQRAJdk1pmJrUU7XQjmSg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)