UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5OG+GL87C//3gx0N271mFrBnfa+/hwOWmLj3ld6Mhqc='
WHERE
key_id = '58cffa889f8040ebd8badc9c4294107167e95781cb0157de6b9e67516ed94f5f'
AND (
token = '5OG+GL87C//3gx0N271mFrBnfa+/hwOWmLj3ld6Mhqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)