UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bDGVtR9O7VWwPAhlfG8EULyunPEuWm7XuCExcF6A/to='
WHERE
key_id = '9bae2306016c687d4397b9190554d72a342d7f634dd82290866f4e151a255aa9'
AND (
token = 'bDGVtR9O7VWwPAhlfG8EULyunPEuWm7XuCExcF6A/to='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)