UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2bBlvp5XsUJTQDGSKFmFD3mFtBUZWb+u7J+cJJDt/lQ='
WHERE
key_id = '94d6a0460a168ddc0158aef3eb9a00bae3ed9a7514884d492d4aa855ec302f97'
AND (
token = '2bBlvp5XsUJTQDGSKFmFD3mFtBUZWb+u7J+cJJDt/lQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)