UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vgBpUcekzk9+udQT5Qs0mqAt3hvxqKbbRBg0eA6XB5o='
WHERE
key_id = '3b914d07e4f7d3f77f472d74b8a1969b83a9b2adde884fee3e2c760f23b11e14'
AND (
token = 'vgBpUcekzk9+udQT5Qs0mqAt3hvxqKbbRBg0eA6XB5o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)