UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '60HpAfVNb19t5vjz2KmSTK+K1IdwWUgz+ZJqFnd+/Xk='
WHERE
key_id = '260fa9d1b78a3c846d9aaec916f90f860da57cec963e5f7d818efdd53619214a'
AND (
token = '60HpAfVNb19t5vjz2KmSTK+K1IdwWUgz+ZJqFnd+/Xk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)