UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wxo9bJbXzAnaF7pAhEQ5IlvH5vlw4zFcNzDBUoaRt+8='
WHERE
key_id = '97e19dd2d8bdc2ad2e4f9efae979f9cc647ace2bb1a9abbad3b8d17a22a85763'
AND (
token = 'wxo9bJbXzAnaF7pAhEQ5IlvH5vlw4zFcNzDBUoaRt+8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)