UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6NunSwYP1o1JjGsHJeqJrHrOIKgWThyIIgpx1/UUW1I='
WHERE
key_id = '60c754c8454d1f178cf78f9f45e479824a21be6c3422259f15426189dd8c79ac'
AND (
token = '6NunSwYP1o1JjGsHJeqJrHrOIKgWThyIIgpx1/UUW1I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)