UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9Hj+tq7YdLW5TjVQLb6LhhHAItcOuRMmNtRHt2wabLg='
WHERE
key_id = '70cef3f75edd1d06044eeaf8013ecf31e70608d0ecdf7d8e0edfb1f732183be8'
AND (
token = '9Hj+tq7YdLW5TjVQLb6LhhHAItcOuRMmNtRHt2wabLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)